package thread;

public class CurrentThreadDemo
{
    public static void main(String[] args)
    {
        Thread t = Thread.currentThread();
        System.out.println(t+"主线程");
        doSome();
        new Thread() {
            public void run(){
                Thread t1 = new Thread();
                System.out.println(t1 + "子线程");
                doSome();
            }
        }.start();
    }
    public static void doSome()
        {
            Thread t = Thread.currentThread();
              System.out.println(t + "正在运行");
            }
}

